/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * configClima.java
 *
 * Created on 14/09/2012, 06:04:29 PM
 */
package interfaz;

import java.awt.Color;

/**
 *
 * @author Isis
 */
public class configAuto extends javax.swing.JPanel {

    /** Creates new form configClima */
    public configAuto() {
        initComponents();
         this.seleccionado="soleado";
         this.setLayout(null);
         this.setBounds(0, 0, 450, 175);
         
         this.aceptar.setBounds(190, 450, 30, 30);
         this.cancelar.setBounds(300, 450, 30, 30);
          

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        aceptar = new javax.swing.JLabel();
        cancelar = new javax.swing.JLabel();

        setBackground(new java.awt.Color(199, 105, 38));

        aceptar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/accept_item.png"))); // NOI18N
        aceptar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                aceptarMouseClicked(evt);
            }
        });

        cancelar.setBackground(new java.awt.Color(199, 155, 123));
        cancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/delete_item.png"))); // NOI18N
        cancelar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                cancelarMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(207, 207, 207)
                .addComponent(aceptar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 84, Short.MAX_VALUE)
                .addComponent(cancelar)
                .addGap(189, 189, 189))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(365, 365, 365)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(aceptar)
                    .addComponent(cancelar))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void aceptarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_aceptarMouseClicked
        // TODO add your handling code here:
        this.setVisible(false);
        interfaz.principal.activarIcono(interfaz.principal.iconoAyuda);
        interfaz.principal.activarIcono(interfaz.principal.iconoHome);
        interfaz.principal.activarIcono(interfaz.principal.iconoConfig);
        interfaz.principal.activarIcono(interfaz.principal.iconoInfo);
        interfaz.principal.activarIcono(interfaz.principal.iconoMapa);
        interfaz.variables.enUso=0;

    }//GEN-LAST:event_aceptarMouseClicked

    private void cancelarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cancelarMouseClicked
     // TODO add your handling code here:
         this.setVisible(false);  
        interfaz.principal.activarIcono(interfaz.principal.iconoAyuda);
        interfaz.principal.activarIcono(interfaz.principal.iconoHome);
        interfaz.principal.activarIcono(interfaz.principal.iconoConfig);
        interfaz.principal.activarIcono(interfaz.principal.iconoInfo);
        interfaz.principal.activarIcono(interfaz.principal.iconoMapa);
        interfaz.variables.enUso=0;
    }//GEN-LAST:event_cancelarMouseClicked

   public void enviarDatos(String Dato)
   {
   this.seleccionado=Dato;
   };
   
   public String seleccionado="";
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel aceptar;
    private javax.swing.JLabel cancelar;
    // End of variables declaration//GEN-END:variables
}
